NAME
/precompiled/queue - a queue of values

DESCRIPTION
/precompiled/queue implements a queue, or fifo. The main differance between /precompiled/queue and /precompiled/fifo is that queues will never block in write, only allocate more memory.

SEE ALSO
/precompiled/fifo

NOTA BENE
Queues are only available on systems with POSIX threads support.


NAME
write - queue a value

SYNTAX
#include <fifo.h>

void queue->write(mixed value);

DESCRIPTION
This function puts a value last in the queue. If the queue is to small to hold the value the queue will be expanded to make room for it.


NAME
read - read a value from the queue

SYNTAX
#include <fifo.h>

mixed queue->read();

DESCRIPTION
This function retreives a value from the queue. Values will be returned in the order they were written. If there are no values present in the queue the current thread will sleep until some other thread writes a value to the queue.


NAME
size - return number of values in queue

SYNTAX
#include <fifo.h>

int queue->size();

DESCRIPTION
This function returns how many values are currently in the queue.